Interfacing WEB4HAM to Paradox Tables with the help of the WEB2PDX program

WEB2PDX is a simple search engine which retrieves data from a Paradox 4.0 table. You do not need the complete Borland Paradox package. Only this program and the file PXENGWIN.DLL is necessary to create simple search engines for a given table.

WEB2PDX is written with the help of the Borland Paradox PASCAL Engine. The Windows version has been derived from my GOPHSRCH program for DOS. The wildcarding of a retrieval has been added (for non-indexed fields wildcarding is not supported by the Paradox Engine).

When starting an application from the HTTP demon and asking for different actions you need to pass information between the demon process (WEB4HAM) and the application program (WEB2PDX). Using DDE or OLE or messages seems far too complicated for a KISS-program (keep it simple, stupid).

So I decided to use the mechanism of reading and writing data to the WEB2PDX.INI file.

The filled out forms from the Mosaic client to the WWW server are sent as a single ASCII string, e.g.

GET /MYSCRIPT.SH?Table=URL&Field=Keyword&Value=Web4Ham HTTP/1.0

The server parses this line and creates three substrings

Request:		GET
Path to file:		MYSCRIPT.SH
Search arguments: 	Table=URL&Field=Keyword&Value=Web4Ham

The path to the program to be started must be specified in the file WEB4HAM.INI in the [PROGRAMS] section.

[PROGRAMS]
MYSCRIPT.SH=C:\MYPATH\WEB2PDX.EXE
Now the server will write the following arguments of the query to the file C:\MYPATH\WEB2PDX.INI
[ARGUMENTS]
File=RESULTS.TXT
Table=URL
Field=Keyword
Value=Web4Ham
The first keyword "FILE" is the path to the file where the WWW server expects the results from the application.

Remarks: If an application is started by the WEB4HAM server, the working directory will be the server's working directory. So you have to place the search engine (WEB2PDX) and the INI file into the directory where WEB4HAM is located.